<div id="ui_tabs">
	<ul>
		<li>
			<a href="#tabs-1"><?php echo $acao ?> SQL</a>
		</li>
		<li>
			<a href="#tabs-2" onclick="montar_filtro_sql(<?php echo $relatorio->rl_id ?>)">Visualizar Filtro</a>
		</li>
	</ul>

	<div id="tabs-1">
		<h1><?php echo $acao ?> SQL</h1>

		<form name="form_cadastra_sql" action="javascript:void(0)" onsubmit="fcadastrar_sql(this)">
			<input type="hidden" name="id_relatorio" value="<?php echo $relatorio->rl_id ?>" />
			<table class="formulario">
				<tbody>
					<tr>
				    	<td width="250">Nome:</td>
				    	<td><input type="text" name="txt_nome_relatorio" size="40" value="<?php echo $relatorio->rl_nome ?>" /></td>
				  	</tr>
				  	<tr>
				    	<td width="250">SQL:</td>
				    	<td>
			    			<textarea name="txt_sql" style="width: 99%" rows="10" value=""><?php echo $relatorio->rl_sql ?></textarea>
				    	</td>
				  	</tr>
				  	<tr>
				  		<td colspan="2">
				  			<button type="submit">Salvar</button>
				  		</td>
				  	</tr>
				</tbody>
			</table>
		</form>
	</div>

	<div id="tabs-2">
		<h1>Filtros relatório SQL</h1>
		
		<div id="exibe_sql"></div>

		<div id="load_filtros_relatorio"></div>
		
		<h1>Resultado filtro SQL</h1>

		<div id="load_resultado_filtro"></div>
		<div class="clear"></div>
	</div>

</div>
